﻿using System;

namespace AnArrayOf
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] ints = new int[]
            {
                10,
                20,
                30
            };
            for(int i=0; i < ints.Length; i++)
            {
            Console.WriteLine(ints[i]);
            }

            //   int[] intss = new int[5];
            //   Console.WriteLine("请输入数字:");
            //   for(int i = 0; i < intss.Length; i++)
            //   {
            //      intss[i] = int.Parse(Console.ReadLine());
            //   }
            //   int max = intss[0];
            //   for(int i = 1; i < intss.Length; i++)
            //  {
            //       if (max < intss[i])
            //       {
            //          max = intss[i];
            //      }
            //  }
            // Console.WriteLine("最大值为:{0}",max);



            int[,] sum =
            {
                {90,29},
                {29,10},
                {20,10}
            };
            for(int i = 0; i < sum.GetLength(0); i++)
            {
                for (int j= 0; j < sum.GetLength(1); j++)
                {
                    Console.Write(sum[i,j]+" ");
                }
                Console.WriteLine();
            }

            ProgramClss programclss = new ProgramClss();
            programclss.Points();

            double[] points = { 80, 90, 89, 78, 89, 78.7 };
            double sumss = 0;
            double avg = 0;
            foreach(double point in points)
            {
                sumss = sumss + point;
            }
            avg = sumss / points.Length;
            Console.WriteLine("总成绩为："+sumss);
            Console.WriteLine("平均成绩为："+avg);



            string str = "姓名,身高,体重";
            string[] condition = { "," };
            string[] result = str.Split(condition, StringSplitOptions.None);
            Console.WriteLine(result.Length-1);

            string strs = "姓名，身高，体重";
            var ArrayHelper = strs.Split('，');
            ArrayHelper.PrintArrauInfo();






        }

    }
}
